package com.lmx.healthcode.ui.holder;

import android.content.Context;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.lmx.healthcode.R;
import com.lmx.healthcode.common.base.BaseAdapterRv;
import com.lmx.healthcode.common.base.BaseHolderRv;
import com.lmx.healthcode.model.bean.Student;
import com.lmx.healthcode.util.CommonUtil;
import com.lmx.healthcode.util.ToastUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author Leung
 * @date 2020/9/11 19:27
 */
public class StudentHolder extends BaseHolderRv<Student> {

    @BindView(R.id.tv_id)
    TextView tvId;
    @BindView(R.id.tv_applyTime)
    TextView tvApplyTime;
    @BindView(R.id.tv_updateTime)
    TextView tvUpdateTime;

    public StudentHolder(Context context, ViewGroup parent, BaseAdapterRv<Student> adapter, int itemType) {
        super(context, R.layout.item_data, parent, adapter, itemType);
    }

    @Override
    public void findView(View itemView) {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void onRefreshView(Student bean, int position) {
        tvId.setText(String.format("流水号：%s", System.currentTimeMillis()));
        tvApplyTime.setText(bean.getUpdatedAt());
        tvUpdateTime.setText(bean.getUpdatedAt());
    }

    @Override
    public void onItemClick(View itemView, int position, Student bean) {
        ToastUtil.showToast("此功能还未开发");
    }
}
